home *** CD-ROM | disk | FTP | other *** search
/ The Mac 13 / the-mac-13.iso / On The Rom / 100 Best Mac CD-ROMs Selection / The Treasure Hunt / thpb.Dxr / 00031.ls < prev    next >
Encoding:
Text File  |  1994-09-16  |  2.6 KB  |  106 lines

  1. on colourin
  2.   global which
  3.   put the clickOn
  4.   set the castNum of sprite 48 to the clickOn + 123
  5.   put the castNum of sprite 48
  6.   puppetSound("paint")
  7.   cursor(200)
  8.   set the locH of sprite 48 to the mouseH
  9.   set the locV of sprite 48 to the mouseV
  10.   updateStage()
  11.   if which = "run" then
  12.     colourinrun()
  13.   else
  14.     if which = "skelly" then
  15.       colourinskelly()
  16.     else
  17.       if which = "monster" then
  18.         colourinmonster()
  19.       else
  20.         if which = "nelson" then
  21.           colourinnelson()
  22.         end if
  23.       end if
  24.     end if
  25.   end if
  26. end
  27.  
  28. on colourinrun
  29.   global colour
  30.   set vestc to the foreColor of sprite 25
  31.   set tailc to the foreColor of sprite 24
  32.   set shoec to the foreColor of sprite 23
  33.   set legsc to the foreColor of sprite 22
  34.   set bodyc to the foreColor of sprite 21
  35.   set lastRoll to 0
  36.   repeat while the mouseDown
  37.     set the locH of sprite 48 to the mouseH
  38.     set the locV of sprite 48 to the mouseV
  39.     if rollOver(12) then
  40.       if lastRoll <> 12 then
  41.         set the foreColor of sprite 25 to colour
  42.         puppetSound("contact")
  43.         set lastRoll to 12
  44.       end if
  45.     else
  46.       if lastRoll = 12 then
  47.         set the foreColor of sprite 25 to vestc
  48.         set lastRoll to 0
  49.       end if
  50.     end if
  51.     if rollOver(20) then
  52.       if lastRoll <> 20 then
  53.         set the foreColor of sprite 24 to colour
  54.         puppetSound("contact")
  55.         set lastRoll to 20
  56.       end if
  57.     else
  58.       if lastRoll = 20 then
  59.         set the foreColor of sprite 24 to tailc
  60.         set lastRoll to 0
  61.       end if
  62.     end if
  63.     if rollOver(26) or rollOver(27) then
  64.       if lastRoll <> 26 then
  65.         puppetSound("contact")
  66.         set the foreColor of sprite 23 to colour
  67.         set lastRoll to 26
  68.       end if
  69.     else
  70.       if lastRoll = 26 then
  71.         set the foreColor of sprite 23 to shoec
  72.         set lastRoll to 0
  73.       end if
  74.     end if
  75.     if rollOver(18) or rollOver(19) then
  76.       if lastRoll <> 18 then
  77.         puppetSound("contact")
  78.         set the foreColor of sprite 22 to colour
  79.         set lastRoll to 18
  80.       end if
  81.     else
  82.       if lastRoll = 18 then
  83.         set the foreColor of sprite 22 to legsc
  84.         set lastRoll to 0
  85.       end if
  86.     end if
  87.     if rollOver(13) or rollOver(14) or rollOver(15) or rollOver(16) or rollOver(17) then
  88.       if lastRoll <> 13 then
  89.         set the foreColor of sprite 21 to colour
  90.         puppetSound("contact")
  91.         set lastRoll to 13
  92.       end if
  93.     else
  94.       if lastRoll = 13 then
  95.         set the foreColor of sprite 21 to bodyc
  96.         set lastRoll to 0
  97.       end if
  98.     end if
  99.     updateStage()
  100.   end repeat
  101.   set the locH of sprite 48 to -90
  102.   set the locH of sprite 48 to -90
  103.   updateStage()
  104.   cursor(-1)
  105. end
  106.